package com.skytech.ibe.hotel.web.action;

import java.util.Map;

import org.apache.struts2.interceptor.SessionAware;

import com.opensymphony.xwork2.ActionSupport;
import com.skytech.ibe.hotel.web.service.HotelInfoService;

public class HotelInfoAction extends ActionSupport implements SessionAware {
	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;
	private String id;
	private String hotelId;
	private String name;
	private int roomCount;
	private String fromDate;
	private String toDate;
	String address;
	HotelInfoService hotelInfoService;
		
	public HotelInfoService getHotelInfoService() {
		return hotelInfoService;
	}

	public void setHotelInfoService(HotelInfoService hotelInfoService) {
		this.hotelInfoService = hotelInfoService;
	}

	public String getId() {
		return id;
	}

	public void setId(String id) {
		this.id = id;
	}

	public String getHotelId() {
		return hotelId;
	}

	public void setHotelId(String hotelId) {
		this.hotelId = hotelId;
	}

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public int getRoomCount() {
		return roomCount;
	}

	public void setRoomCount(int roomCount) {
		this.roomCount = roomCount;
	}

	public String getFromDate() {
		return fromDate;
	}

	public void setFromDate(String fromDate) {
		this.fromDate = fromDate;
	}

	public String getToDate() {
		return toDate;
	}

	public void setToDate(String toDate) {
		this.toDate = toDate;
	}

	public String getAddress() {
		return address;
	}

	public void setAddress(String address) {
		this.address = address;
	}

	public void setSession(Map arg0) {
		// TODO Auto-generated method stub
		
	}

	public String execute() {
		
		return SUCCESS;
	}
	
	public String addHotelInfo()
	{
		System.out.println("HOTEL NAME 		:"+name);
		System.out.println("HOTEL ADDRESS 	:"+address);
		System.out.println("HOTEL ROOMCOUNT :"+roomCount);
		
		if(this.hotelInfoService != null)
			System.out.println("*** Call HotelInfoService  ****");
		
		System.out.println("Hotel Info Added successfully");
		return SUCCESS;
	}
	public String bookHotel()
	{
		System.out.println("FROM DATE 		:"+fromDate);
		System.out.println("TO DATE:"+toDate);
		System.out.println("ROOM COUNT"+roomCount);
		
		if(this.hotelInfoService != null)
			System.out.println("*** Call HotelInfoService  ****");
		
		System.out.println("Hotel Info Added successfully");
		return SUCCESS;
	}

}
